<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    {% block meta %}{% endblock %}
    <title>{% block title %}{% endblock %}</title>
    <link rel="stylesheet" href="/static/css/uikit.min.css">
    <script src="http://cdnjs.cloudflare.com/ajax/libs/vue/0.11.0/vue.min.js"></script>
    <script src="//code.jquery.com/jquery-2.1.1.min.js"></script>
    <script src="/static/js/uikit.min.js"></script>
    <script src="/static/js/feling.js"></script>
    {% block before_head %}{% endblock %}
</head>
<body >
    {# header begin #}
    <div class="uk-container uk-container-center uk-margin-bottom">
        <a href="/" class="uk-navbar-brand">...</a>
    </div>
    <nav class ="uk-navbar uk-margin-bottom " >
        <div class="uk-container uk-container-center">
            <ul class="uk-navbar-nav">
                <li><a href="/">首页</a></li>
            </ul>
            <div class="uk-navbar-flip">
                <ul class="uk-navbar-nav">
                    {% if user %}
                    <li class="uk-parent" data-uk-dropdown>
                        <a href="#0"><img style="width:25px;" src="{{user.image}}" class="uk-border-rounded" />   {{ user.name }}</a>
                        <div class="uk-dropdown uk-dropdown-navbar">
                            <ul class="uk-nav uk-nav-navbar">
                                <li><a href="/user/{{user.name}}"><i class="uk-icon-home"></i> 个人空间</a></li>
                                <li><a href="/user/{{user.name}}/megbox"><i class="uk-icon-inbox"></i> 消息箱</a></li>
                                <li><a href="/sign_out"><i class="uk-icon-sign-out"></i> 退出</a></li>
                            </ul>
                        </div>
                    </li>
                    {% else %}
                    <li><a href="/sign_in"><i class="uk-icon-sign-in"></i> 登录</a></li>
                    <li><a href="/sign_up"><i class="uk-icon-edit"></i> 注册</a></li>
                    {% endif %}
                </ul>
            </div>
        </div>
    </nav>
    {# header end #}
    
    {# content begin #}
    <div class="uk-container uk-container-center">
        <div class="uk-grid">
            {% block content %}{% endblock %}
        </div>
    </div>
    {# content end #}

    {# footer begin #}
    <div class="uk-margin-large-top" style="background-color:#eee; border-top:1px solid #ccc;">
        <div class="uk-container uk-container-center uk-text-center">
            <div class="uk-panel uk-margin-top uk-margin-bottom">
                <p>Powered by <a href="">feling</a>. Copyright &copy; 2014. [<a href="/manage/" target="_blank">Manage</a>]</p>
                <p><a href="/user/chenyanclyz" target="_blank">chenyanclyz</a>. All rights reserved.</p>
            </div>
        </div>
    </div>
    {# footer end #}
</body>
</html>